/*****************************************************************************
*        描述 :
*             文件描述
*        CLR版本:            3.5
*        创建者 :            蒋 光
*        个人域名:           jiangguang.net.cn
*        命名空间名称:       ECP.DataAccess.Utilities
*        文件名:             DbHelperFactory.cs
*        创建系统时间:       2012/11/2 19:07:01
*        创建年份:           2012
*
/*****************************************************************************/

namespace ECP.DataAccess.Utilities
{
    using System.Reflection;
    using ECP.Utilities;

    public class DbHelperFactory
    {
        public static readonly string DbConnectionString = BaseConfiguration.Instance.DbConnectionString;
        private static readonly string DbHelperAssmely = BaseConfiguration.Instance.DbHelperAssmely;
        private static readonly string DbHelperClass = BaseConfiguration.Instance.DbHelperClass;
        private static IDbHelper helper;
        private static object locker = new object();

        public static IDbHelper GetHelper()
        {
            return (IDbHelper)Assembly.Load(DbHelperAssmely).CreateInstance(DbHelperClass, true);
        }
    }
}